home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2006 May
/
PCWMAY06.iso
/
Software
/
Resources
/
PaperCut Quota 6.1
/
pc-setup.exe
/
{app}
/
WebAdmin
/
Logon.asp
< prev
next >
Wrap
Text File
|
2005-07-05
|
2KB
|
63 lines
<%@ Language=VBScript %>
<%' (c) Copyright 1999-2004 PaperCut Software Pty. Ltd. %>
<!-- #include file="includes/PCCommon.inc" -->
<!--#include file="includes/header.inc" -->
<h1><%=GetText("Login")%></h1>
<%
If Not gblnAllowAnonymousAccess Then
WriteErrorMessage GetText("AnonAccessDisabled")
Response.End
End If
Dim strUsername
strUsername = Trim(Request("strUsername"))
If strUsername <> "" Then
strUsername = Trim(Request("strUsername"))
Session("AnonUsername") = ""
' Check that it's a valid user
Dim objPCWeb
Set objPCWeb = Server.CreateObject("PCWebAdmin.PCWebUsers")
If objPCWeb.Error Then
WriteErrorMessage objPCWeb.ErrorDescription
Else
objPCWeb.SeekUser(strUsername)
If (UCase(objPCWeb.UserName) <> UCase(strUsername)) Then
' Can't find the user
WriteErrorMessage GetTextReplace("ErrorCantFindUser", Array(strUsername))
Else
' Valid user, so log them in
Session("AnonUsername") = strUsername
' Send them back to the default page
Response.Redirect "default.asp"
End If
End If
Set objPCWeb = Nothing
End If
%>
<p><%=GetText("LoginInstructions")%></p>
<FORM ACTION="Logon.asp" METHOD="POST">
<INPUT type="hidden" name=blnSubmitted value="T">
<TABLE class="webAdmin" width="500">
<TR class="evenRow" >
<TH width="150"><%=GetText("Username")%>:</TH>
<TD width="250"><input type="text" name="strUserName" value="<%= strUsername%>"></TD>
</TR>
<TR>
<TD align="right" colspan="2">
<INPUT type="submit" value="<%=GetText("Login")%>" name="cmdLogin">
</TD>
</TR>
</TABLE>
</FORM>
<!--#include file="includes/footer.inc" -->